#!ipxe

# Slackware Operating System
# http://www.slackware.com

goto ${menu}

:slackware
set os slackware
iseq ${arch} x86_64 && set sbits 64 || clear sbits

menu ${os}
{% for item in releases.slackware.versions %}
item {{ item.code_name }} ${space} ${os} {{ item.name }}
{% endfor %}
item --key o other Choose other version [o]
choose version || exit 0
iseq ${version} other || goto skip_read_version
echo ${cls}
echo -n Enter version: ${} && read version
:skip_read_version
set dir ${slackware_base_dir}/slackware${sbits}-${version}
goto boot

:boot
imgfree
kernel ${slackware_mirror}/${dir}/kernels/huge.s/bzImage
initrd ${slackware_mirror}/${dir}/isolinux/initrd.img
imgargs bzImage load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s ${params} ${cmdline}
isset ${debug} && prompt ||
boot
